{% extends 'origin.html' %}
{% load static %}

{% block css %}
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css' %}">
{% endblock %}

{% block content %}
    <div class="container">
        <form method="post" novalidate>
            {% csrf_token %}
            {% for field in form %}
                <div class="col-xs-6">
                    <div class="form-group">
                        <label>{{field.label}}</label>
                        {{field}}
                        <span style="color:red">{{field.errors.0}}</span>
                    </div>
                </div>
            {% endfor %}
            <div class="col-xs-12">
                <button type="submit" class="btn btn-primary" style="margin-top:20px;margin-left:200px">提交</button>
            </div>
        </form>
    </div>
{% endblock %}

{% block js %}
    <script src="{% static 'plugins/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.min.js' %}"></script>
    <script src="{% static 'plugins/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js' %}"></script>
    <script>
        $(function(){
            $('#id_date').datetimepicker({
                language:'zh-CN',
                format:'yyyy-mm-dd',
                minView:'month',
                todayBtn:1,
                todayHighlight:1,
                autoclose:true
            });
        });
    </script>
{% endblock %}